﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Diagnostics;
using ThreeByte.ActiveDeck.Config;
using System.Collections.ObjectModel;

namespace ThreeByte.ActiveDeck.Data.UserResponse
{
    [UserData(ShortTypeName = "Empty")]
    public class EmptyUserData : AggregateUserData
    {

        private EmptyUserData() {
        }

        protected EmptyUserData(XElement node): this() {

        }

        public EmptyUserData(int page)
            : this() {
            Page = page;
        }

        //public override XElement ToXml() {
        //    XElement node = base.ToXml();

        //    foreach(string s in Answers) {
        //        node.Add(new XElement(ns + "Answer", new XAttribute("Text", s)));
        //    }
        //    return node;
        //}

        //Update the Answer values and return true if anything changed
        public override bool UpdateUserData(AggregateUserData newUserData) {
            throw new InvalidOperationException("Cannot update Empty User data");
        }

        public static new EmptyUserData ParseXml(XElement node) {
            return new EmptyUserData(node);
        }

    }
}
